package com.secneo.appshare.remind;

import android.graphics.drawable.Drawable;

/**
 * 一条提醒
 * */
public class Remind {
	
	public enum RemindAction{
		/*0表示新用户，1表示分享，2表示收藏，3表示评论，4表示下载,5表示获得勋章*/
		NEWUSERACTION ,
		NEWSHAREACTION ,
		NEWCOLLECTIONACTION ,
		NEWCOMMENTACTION ,
		NEWDOWNLOADACTION ,
		NEWMEDALACTION
	}
	
	String userName ;
	String userId ;
	String userIconUrl ;
	public Drawable userIcon ;
	String date ;
	RemindAction action ;
	String comments ;
	String appIconUrl ;
	public Drawable appIcon ;
	String appName ;
	String pakageName ;
	
	String data ;
	
	public Remind(){
		
	}
	
	
	public Remind(String userName, String userId, String userIconUrl,
			Drawable userIcon, String date, RemindAction action,
			String comments, String appIconUrl, Drawable appIcon,
			String appName, String pakageName) {
		super();
		this.userName = userName;
		this.userId = userId;
		this.userIconUrl = userIconUrl;
		this.userIcon = userIcon;
		this.date = date;
		this.action = action;
		this.comments = comments;
		this.appIconUrl = appIconUrl;
		this.appIcon = appIcon;
		this.appName = appName;
		this.pakageName = pakageName;
	}


	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	public String getDate() {
		return date;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public RemindAction getAction() {
		return action;
	}
	public void setAction(int action) {
		switch(action){
		case 0:
			this.action = RemindAction.NEWUSERACTION ;
			break ;
		case 1:
			this.action = RemindAction.NEWSHAREACTION ;
			break ;
		case 2:
			this.action = RemindAction.NEWCOLLECTIONACTION ;
			break ;
		case 3:
			this.action = RemindAction.NEWCOMMENTACTION ;
			break ;
		case 4:
			this.action = RemindAction.NEWDOWNLOADACTION ;
			break ;
		case 5:
			this.action = RemindAction.NEWMEDALACTION ;
			break ;
		default:
			this.action = RemindAction.NEWCOMMENTACTION ;
			break ;
		}
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	
	public String getAppName() {
		return appName;
	}
	public void setAppName(String appName) {
		this.appName = appName;
	}
	public String getPakageName() {
		return pakageName;
	}
	public void setPakageName(String pakageName) {
		this.pakageName = pakageName;
	}


	public String getUserIconUrl() {
		return userIconUrl;
	}


	public void setUserIconUrl(String userIconUrl) {
		this.userIconUrl = userIconUrl;
	}


	public Drawable getUserIcon() {
		return userIcon;
	}


	public void setUserIcon(Drawable userIcon) {
		this.userIcon = userIcon;
	}


	public String getAppIconUrl() {
		return appIconUrl;
	}


	public void setAppIconUrl(String appIconUrl) {
		this.appIconUrl = appIconUrl;
	}


	public Drawable getAppIcon() {
		return appIcon;
	}


	public void setAppIcon(Drawable appIcon) {
		this.appIcon = appIcon;
	}


	public void setAction(RemindAction action) {
		this.action = action;
	}
		
	public void setData(){
		switch(this.action){
		case NEWUSERACTION:
			data = this.userName + "刚刚加入了安卓分享" ;
			break ;
		case NEWSHAREACTION:
			data = this.userName + "分享了" + this.appName ;
			break ;
		case NEWCOLLECTIONACTION:
			data = this.userName + "收藏了" + this.appName ;
			break ;
		case NEWCOMMENTACTION:
			data = this.userName + "评论了" + this.appName + "：" + this.comments ;
			break ;
		case NEWDOWNLOADACTION:
			data = this.userName + "下载了" + this.appName ;
			break ;
		case NEWMEDALACTION:
			data = this.userName + "获得了" + this.comments + "勋章" ;
			break ;
		default:
			data = "" ;
		}
	}
	
	public String getData(){
		return data ;
	}
	
}
